using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._Iterator
{
    /// <summary>
    /// <para>Iterate Tables</para>
    /// <para>Iterates over tables in a workspace.</para>
    /// <para>循环访问工作区中的表。</para>
    /// </summary>    
    [DisplayName("Iterate Tables")]
    public class IterateTables : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IterateTables()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Workspace</para>
        /// <para>Workspace containing the tables to iterate.</para>
        /// <para>包含要迭代的表的工作区。</para>
        /// </param>
        public IterateTables(object _in_workspace)
        {
            this._in_workspace = _in_workspace;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "Iterate Tables";

        public override string CallName => "mb.IterateTables";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_workspace, _wildcard, _table_type.GetGPValue(), _recursive.GetGPValue(), _table, _name];

        /// <summary>
        /// <para>Workspace</para>
        /// <para>Workspace containing the tables to iterate.</para>
        /// <para>包含要迭代的表的工作区。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Wildcard</para>
        /// <para>A combination of * and characters that help to limit the results. The asterisk is the same as saying ALL. If no wildcard is specified, all inputs will be returned. For example, it can be used to restrict Iteration over input names starting with a certain character or word (for example, A* or Ari* or Land* and so on).</para>
        /// <para>* 和字符的组合，有助于限制结果。星号与说 ALL 相同。如果未指定通配符，则将返回所有输入。例如，它可用于限制对以特定字符或单词开头的输入名称（例如，A* 或 Ari* 或 Land* 等）的迭代。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Wildcard")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _wildcard { get; set; } = null;


        /// <summary>
        /// <para>Table Type</para>
        /// <para><xdoc>
        ///   <para>For folder workspaces (shapefiles and coverages), choose the table type.</para>
        ///   <bulletList>
        ///     <bullet_item>dBASE (shapefiles)—dBASE table (shapefiles)</bullet_item><para/>
        ///     <bullet_item>INFO (coverages)—INFO table (coverages)</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>对于文件夹工作空间（shapefile 和 coverage），选择表类型。</para>
        ///   <bulletList>
        ///     <bullet_item>dBASE （shapefile） - dBASE 表 （shapefile）</bullet_item><para/>
        ///     <bullet_item>INFO（覆盖率）—INFO 表（覆盖率）</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Table Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _table_type_value? _table_type { get; set; } = null;

        public enum _table_type_value
        {
            /// <summary>
            /// <para>dBASE (shapefiles)</para>
            /// <para>dBASE (shapefiles)—dBASE table (shapefiles)</para>
            /// <para>dBASE （shapefile） - dBASE 表 （shapefile）</para>
            /// </summary>
            [Description("dBASE (shapefiles)")]
            [GPEnumValue("DBASE")]
            _DBASE,

            /// <summary>
            /// <para>INFO (coverages)</para>
            /// <para>INFO (coverages)—INFO table (coverages)</para>
            /// <para>INFO（覆盖率）—INFO 表（覆盖率）</para>
            /// </summary>
            [Description("INFO (coverages)")]
            [GPEnumValue("INFO")]
            _INFO,

        }

        /// <summary>
        /// <para>Recursive</para>
        /// <para><xdoc>
        ///   <para>Determines if subfolders in the main folder will be iterated through recursively.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Will iterate through all subfolders.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Will not iterate through all subfolders.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否以递归方式循环访问主文件夹中的子文件夹。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将循环访问所有子文件夹。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会循环访问所有子文件夹。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Recursive")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _recursive_value _recursive { get; set; } = _recursive_value._false;

        public enum _recursive_value
        {
            /// <summary>
            /// <para>RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RECURSIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_RECURSIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _table { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _name { get; set; }


        public IterateTables SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}